#include <iostream>
using std::cout;
using std::endl;

class Base{
public:
    virtual void print(){
        cout << "Base::print" << endl;
    }
};

class Derived
: public Base
{
public:
    void print(){
        cout << "Derived::print" << endl;
    }
};

void test0(){
    static int sNum = 1;
    cout << &sNum << endl;

    const char * pstr = "hello";
    printf("%p\n",pstr);

    cout << endl;
    Base b1;
    long * p = (long*)(&b1);
    long * pb = (long*)(*p);
    cout << pb << endl;
    /* cout << *pb << endl; */
    /* *pb = 1; */

    Base b2;
    long * p2 = (long*)(&b2);
    long * pb2 = (long*)(*p2);
    cout << pb2 << endl;

    Derived d1;
    long * pd = (long*)(&d1);
    long * pdd = (long*)(*pd);
    cout << pdd << endl;
    
}

int main(void){
    test0();
    return 0;
}
